{include file='index/_header.html'}

<div class="top-header" style="background-image: url(__STATIC__/themes/__THEME__/img/banner.jpg)">
    <div class="container">
        <h2 class="top-title">{$cats.title}</h2>
        <p class="lead top-description">
            {$cats.subtitle}
            <span class="pull-right"><a href="{:url('index/index')}">首页 </a>  &raquo; <a href="{$cats.nav_href}">{$cats.title}</a></span>
        </p>
    </div>
</div>

<div class="container blog mtn">

    <div class="row">
        <!-- content -->
        <div class="col-sm-9 aphp-msg">
            <article>
                <header>
                    <h3>{if $vo['is_top']==1:}<span class="text-danger">置顶</span> {/if}{$vo.title} <small class="pull-right"><a href="javascript:history.back(-1);" class="btn btn-primary btn-sm">返回</a></small></h3>
                    <div class="text-muted">
                        <i class="glyphicon glyphicon-th-large"></i> {:echo($cats['sub_nav'][$vo['tid']]['title'])}&nbsp;&nbsp;
                        <i class="glyphicon glyphicon-time"></i> {$vo.update_time|date='Y-m-d H:i:s'}&nbsp;&nbsp;
                        <i class="glyphicon glyphicon-eye-open"></i> {$vo.read_count}&nbsp;&nbsp;
                    </div>
                </header>
                <hr />
                <section>
                    {$vo.content}
                    {!empty $vo['url']:}<p><a class="btn btn-primary" href="{$vo.url}" target="_blank">购买链接</a></p>{/empty}
                </section>

                <div class="msg-header clearfix">
                    {php $tags=widget('common.tags')->get($vo['tags_ids'])}
                    {foreach $tags as $sign=>$name}
                    <a href="{:url('news/index', ['tag'=>$sign])}">#{$name}</a>&nbsp;&nbsp;
                    {/foreach}
                </div>
            </article>
            <hr />
            <div class="clearfix">
                {php $related=get_related($vo['id'], 'news', ['order'=>'is_top DESC,sort ASC,id DESC'])}
                <span class="pull-left">
                    {if isset($related['prev']['id']):}<a href="{:url('news/detail',['id'=>$related['prev']['id']])}">上一篇：{$related.prev.title}</a>{else:}上一篇：没有了{/if}
                </span>
                <span class="pull-right">
                    {if isset($related['next']['id']):}<a href="{:url('news/detail',['id'=>$related['next']['id']])}">下一篇：{$related.next.title}</a>{else:}下一篇：没有了{/if}
                </span>
            </div>

        </div>
        <!-- sidebar -->
        <div class="col-sm-3">
            {include file='index/_sidebar.html'}
        </div>
    </div>

</div>
{include file='index/_footer.html'}
<script>
    $(document).ready(function () {
        $('#search').click(function () {
            "" != $("#keyword").val() ? location.href = "{:url('news/index')}?keyword=" + $("#keyword").val() : toast('请输入关键字');
        });
    });
</script>
</body>
</html>